package net.factoryOpen.quickfactory.manufacturing.ord.service.impl;

import java.math.BigDecimal;
import java.util.List;

import net.factoryOpen.core.common.status.BillStatus;
import com.ruoyi.common.utils.DateUtils;
import net.factoryOpen.quickfactory.manufacturing.eng.domain.EngMaterial;
import net.factoryOpen.quickfactory.manufacturing.eng.mapper.EngMaterialMapper;
import net.factoryOpen.quickfactory.manufacturing.ord.domain.OrdContractItem;
import net.factoryOpen.quickfactory.manufacturing.ord.mapper.OrdContractItemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import net.factoryOpen.quickfactory.manufacturing.ord.mapper.OrdContractMapper;
import net.factoryOpen.quickfactory.manufacturing.ord.domain.OrdContract;
import net.factoryOpen.quickfactory.manufacturing.ord.service.IOrdContractService;

import net.factoryOpen.quickfactory.system.domain.SysBillFrozen;
import net.factoryOpen.quickfactory.system.mapper.SysBillFrozenMapper;

/**
 * 合同发布Service业务层处理
 * 
 * @author factoryOpen
 * @date 2024-07-04
 */
@Service
public class OrdContractServiceImpl implements IOrdContractService 
{
    @Autowired(required = false)
    private OrdContractMapper ordContractMapper;

    @Autowired(required = false)
    private OrdContractItemMapper ordContractItemMapper;

    @Autowired(required = false)
    private EngMaterialMapper materialMapper;

    @Autowired(required = false)
    private SysBillFrozenMapper sysBillFrozenMapper;


    /**
     * 查询订单登记发布
     * 
     * @param id 订单登记发布主键
     * @return 订单登记发布
     */
    @Override
    public OrdContract selectOrdContractById(Long id)
    {
        return ordContractMapper.selectOrdContractById(id);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     * 
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractDraftList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractDraftList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractPublishingList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractPublishingList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractProcessingList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractProcessingList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractFinishingList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractFinishingList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractHistoryList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractHistoryList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractAllList(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractAllList(ordContract);
    }

    /**
     * 查询订单登记发布列表
     *
     * @param ordContract 订单登记发布
     * @return 订单登记发布
     */
    @Override
    public List<OrdContract> selectOrdContractList4Adult(OrdContract ordContract)
    {
        return ordContractMapper.selectOrdContractList4Adult(ordContract);
    }

    /**
     * 新增订单登记发布
     * 
     * @param ordContract 订单登记发布
     * @return 结果
     */
    @Override
    public int insertOrdContract(OrdContract ordContract)
    {
        ordContract.setCreateTime(DateUtils.getNowDate());
        return ordContractMapper.insertOrdContract(ordContract);
    }

    /**
     * 修改订单登记发布
     * 
     * @param ordContract 订单登记发布
     * @return 结果
     */
    @Override
    public int updateOrdContract(OrdContract ordContract)
    {
        ordContract.setUpdateTime(DateUtils.getNowDate());
        return ordContractMapper.updateOrdContract(ordContract);
    }

    /**
     * 批量删除订单登记发布
     * 
     * @param ids 需要删除的订单登记发布主键
     * @return 结果
     */
    @Override
    public int deleteOrdContractByIds(Long[] ids)
    {
        return ordContractMapper.deleteOrdContractByIds(ids);
    }

    /**
     * 删除订单登记发布信息
     * 
     * @param id 订单登记发布主键
     * @return 结果
     */
    @Override
    public int deleteOrdContractById(Long id)
    {
        return ordContractMapper.deleteOrdContractById(id);
    }

}
